-- card: 11180 from stack: in.0 -- bmap block id: 0 -- flags: 4000 -- background id: 3837 -- name: FileModDate ----- HyperTalk script ----- on closecard hide message window end closecard -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=82 top=302 right=324 bottom=182 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Install ----- HyperTalk script ----- on mouseUp if the optionkey is down then pass mouseup end if put (long name of this stack) into sourceStack delete first word of sourceStack delete first character of sourceStack delete last character of sourceStack put "Select a stack to copy this resource into." put filename("STAK") into fname if fname is empty then hide message window exit mouseup end if if sourcestack=fname then beep Answer "Get real. You can't install it in this stack" hide message window exit mouseup end if -- ModResCopy sourceStack,fname,"XFCN","FileModDate" -- get the result if first char of it is "E" then put it into the message box beep answer "Attempt to install resource has failed." else beep answer "Resource installation successful" end if hide message window end mouseUp -- part 2 (button) -- low flags: 00 -- high flags: A004 -- rect: left=231 top=244 right=297 bottom=290 -- title width / last selected line: 0 -- icon id / first selected line: 27056 / 27056 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Try this ----- HyperTalk script ----- on mouseUp put "Select a file..." put filename() into thisfile put "Created on " into info convert fileModDate(thisfile,true) to short date put it after info put "; Modified on " after info convert fileModDate(thisfile,false) to short date put it after info put info end mouseUp -- part contents for background part 5 ----- text ----- FileModDate -- part contents for background part 10 ----- text ----- 7 -- part contents for background part 6 ----- text ----- This can be used to get the creation or modification date of a file, or as a 'File exists' utility. Thanks to: Dewi Williams 2227 Juniper Court Boulder CO 80302 (303) 443 9038 Delphi: DEWI -- part contents for background part 7 ----- text ----- Syntax: put FileModDate("PathName", ) into thisDate "PathName" is the full pathname to the target. can be true or false. If it is true, the function will return the creation date, otherwise it will return the modification date. The date is returned in ticks format. If there is an error an empty string is returned.